Add configurable HTTP polling interval for block monitoring#362
Merged
aodhgan merged 2 commits intogabriel/txm-force-initializationfrom Feb 5, 2025
Merged
Conversation
Deploying happychain with
|
| Latest commit: |
991bf7f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a598b157.happychain.pages.dev |
| Branch Preview URL: | https://gabriel-txm-http-polling-int.happychain.pages.dev |
Contributor
Author
10 tasks
1f12879 to
db559e2
Compare
3be8f45 to
6d998d9
Compare
10 tasks
10 tasks
db559e2 to
ce40619
Compare
df46fd6 to
f48f94c
Compare
This was referenced Jan 23, 2025
Merged
Merged
Merged
ce40619 to
30792ba
Compare
f48f94c to
0b937a8
Compare
not-reed
reviewed
Jan 23, 2025
| public readonly blockTime: bigint | ||
| public readonly finalizedTransactionPurgeTime: number | ||
| public readonly pollingInterval: number | ||
| public readonly transportProtocol: "http" | "websocket" |
Contributor
There was a problem hiding this comment.
feels odd to me to have 'http' and 'websocket' instead of 'ws'
also not sure if its an issue for you here or not (i think not?) but do you want tls variants?
Suggested change
| public readonly transportProtocol: "http" | "websocket" | |
| public readonly transportProtocol: "http" | "https" | "ws" | "wss" |
Contributor
There was a problem hiding this comment.
the getUrlProtocol() function decodes "ws" or "wss" into either "http" or "websocket" and throws if its neither so its ok
30792ba to
9a55112
Compare
0b937a8 to
9fa6f10
Compare
Merged
10 tasks
9a55112 to
5aee502
Compare
9fa6f10 to
9cee1b9
Compare
5aee502 to
7459249
Compare
9cee1b9 to
61a2966
Compare
7459249 to
f8fd7af
Compare
61a2966 to
6655ac3
Compare
aodhgan
reviewed
Feb 5, 2025
|
|
||
| /** | ||
| * Specifies the polling interval in milliseconds. | ||
| * Defaults to 1/2 of the block time. |
Contributor
There was a problem hiding this comment.
the PR description says the default 1/8th of the block time, but we will find an ideal default thru testing i think
aodhgan
approved these changes
Feb 5, 2025
f8fd7af to
28a3351
Compare
6655ac3 to
991bf7f
Compare
10 tasks
19b3996
into
gabriel/txm-force-initialization
1 of 2 checks passed
This was referenced Feb 11, 2025
Closed
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Linked Issues
Description
Adds configurable HTTP polling interval for block monitoring based on block time. When using HTTP transport, the system now polls for new blocks at an interval that is a fraction of the block time (defaulting to 1/8th)
Toggle Checklist
Checklist
Basics
norswap/build-system-caching).Reminder: PR review guidelines
Correctness
C1. Builds and passes tests.
C2. The code is properly parameterized & compatible with different environments (e.g. local,
testnet, mainnet, standalone wallet, ...).
C3. I have manually tested my changes & connected features.
C4. I have performed a thorough self-review of my code after submitting the PR,
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.